package com.thb.pay.controller;


import com.thb.pay.api.agent.AgentAccountServiceApi;
import com.thb.pay.core.utils.PageResult;
import com.thb.pay.service.AgentAccountService;
import com.thb.pay.vo.req.AgentAccountPageReq;
import com.thb.pay.vo.resp.AgentAccountVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 代理商-账户表 前端控制器
 * </p>
 *
 * @author lucky
 * @since 2019-07-21
 */
@RestController
public class AgentAccountController implements AgentAccountServiceApi {

    @Autowired
    private AgentAccountService agentAccountService;

    @Override
    public PageResult<AgentAccountVo> findPage(@RequestBody AgentAccountPageReq pageReq) {
        return agentAccountService.findPage(pageReq);
    }

    @Override
    public AgentAccountVo getById(@RequestParam("agentId") Long agentId) {
        return agentAccountService.getByAgentId(agentId);
    }

    @Override
    public void increaseAmountToAccount(@RequestParam("agentId") Long agentId,
                                        @RequestParam("amount") Long amount,
                                        @RequestParam("bizType") Integer bizType,
                                        @RequestParam("bizItem") String bizItem,
                                        @RequestParam("orderId") String orderId) {

    }

    @Override
    public void decreaseAmountToAccount(@RequestParam("agentId") Long agentId,
                                        @RequestParam("amount") Long amount,
                                        @RequestParam("bizType") Integer bizType,
                                        @RequestParam("bizItem") String bizItem) {

    }

    @Override
    public void freezeAmountToAccount(@RequestParam("agentId") Long agentId,
                                      @RequestParam("freezeAmount") Long freezeAmount) {

    }

    @Override
    public void unFreezeAmountToAccount(@RequestParam("agentId") Long agentId,
                                        @RequestParam("unfreezeAmount") Long unfreezeAmount,
                                        @RequestParam("requestNo") String requestNo,
                                        @RequestParam("bizType") Integer bizType) {

    }

    @Override
    public void unFreezeSettAmountToAccount(@RequestParam("agentId") Long agentId,
                                            @RequestParam("unfreezeAmount") Long unfreezeAmount) {

    }

}
